from django.forms.widgets import Textarea
from django.forms.fields import DateField
from django.contrib.localflavor.generic.forms import DateField
from django.contrib.admin.widgets import AdminDateWidget
from django import forms
from django.forms import ModelForm
from storehouse.models import order_product
from storehouse.models import order
from storehouse.models import *
from django.contrib.admin import *
from django.forms import *
from django.forms.extras import SelectDateWidget
from storehouse.models import document


class OrderForm(ModelForm):
    class Meta:
        model = order
        exclude = ('system_user','state','is_archived')
        widgets = {
            'receive_date':SelectDateWidget(),
            'release_date':SelectDateWidget()
        }
        
class Order_productForm(ModelForm):
    class Meta:
        model = order_product

class DocumentModelForm(ModelForm):
    class Meta:
        model  = document
        exclude=('creator','liquidation','inventory','document_type','storehouse')
        list_filter = ('document_type',)
        

